package com.banshuibao.bsb_android;

import android.os.Environment;

/**
 * Created by zyh on 2017/2/8.
 */

public class Constants {

    public final static Host DEBUG = Host.REL;

    /**
     * 请求接口
     **/
    public static class Url {

        private final static String HOST = DEBUG.getHost();
        public final static String SHOW_IMAGE = HOST + "bsb/showImg/";
        public final static String LOGIN = HOST + "bsb/login";//登录
        public final static String GET_CODE = HOST + "bsb/imgcode/";//图形验证码
        public final static String SEND_SMS = HOST + "bsb/sendSms";//短信验证码
        public final static String REGISTER = HOST + "bsb/register";//注册
        public final static String SEND_CONSULTTATION = HOST + "/bsb/rapid/release";//发布快速咨询
        public final static String CONSULTTATION_LIST = HOST + "/bsb/rapid/wait";//快速咨询列表
        public final static String Q_CONSULTTATION = HOST + "/bsb/rapid/grap";//抢快速咨询
        public final static String IF_CONSULTTATION = HOST + "/bsb/rapid/isgrap";//是否有未答的快速咨询
        public final static String COMMIT_CONSULTTATION = HOST + "/bsb/rapid/answer";//提交快速咨询
        public final static String LOGOUT = HOST + "/bsb/logout";//退出登录
        public final static String ASK_RAPID_LIST = HOST + "/bsb/rapid/common/history";//我问快速咨询列表记录接口
        public final static String ASK_RAPID_DETAILS = HOST + "/bsb/rapid/details/common";//我问快速咨询详情接口
        public final static String TAX_RAPID_LIST = HOST + "/bsb/rapid/tax/history";//我回答的快速咨询列表记录接口
        public final static String TAX_RAPID_DETAILS = HOST + "/bsb/rapid/details/tax";//我答得快速咨询详情接口
        public final static String ADOPT = HOST + "/bsb/rapid/adop";//采纳
        public final static String PERSONAL_PAGE = HOST + "/bsb/expert/home";//专家个人主页
        public final static String IS_ADOPT = HOST + "/bsb/is/adop";//是否有未采纳的答案接口
        public final static String UP_PASSWORD = HOST + "/bsb/alter/pwd";//修改密码
        public final static String ONE_LIST = HOST + "/bsb/list/one";//一对一咨询记录
        public final static String ONE_LIST_TWO = HOST + "/bsb/twolist/one";//改版一对一咨询记录
        public final static String ONE_ANSWER = HOST + "/bsb/one/answer";//一对一咨询记录回答
        public final static String EXPERT_LIST = HOST + "/bsb/list/expert";//专家答疑列表
        public final static String ASK_LIST = HOST + "/bsb/list/ask";//专家答疑追问列表
        public final static String ANSWER_ASK = HOST + "/bsb/answer/ask";//专家答疑回答追问
        public final static String WX_ORDER = HOST + "/bsb/wx/order";//查询微信是否支付成功
        public final static String BALANCE = HOST + "/bsb/list/running";//钱包交易记录
        public static final String BUSER_UPLOAD = HOST + "/bsb/file/upload";//上传文件
        public final static String APPLYEXPERT = HOST + "/bsb/expert/apply";//申请专家，和编辑接口
        public final static String LOOK_APPLY = HOST + "/bsb/one/apply";//查看申请专家
        public final static String FIND_PWD = HOST + "/bsb/pwd/find";//忘记密码
        public final static String WITHDRAW = HOST + "/bsb/money/withdraw";//提现
        public final static String WITHDRAW_LIST = HOST + "/bsb/list/withdraw";//提现记录
        public final static String ONE_LIST_DETAILS = HOST + "/bsb/userone/one";//一对一详情
        public final static String ONE_ASK = HOST + "/bsb/ask/one";//发布追问
        public final static String ANSWER_ONE_ASK = HOST + "/bsb/oneask/answer";//回答追问
        public final static String KNOWLEDGE_LIST = HOST + "/bsb/knowledege/list";//知识库列表
        public final static String KNOWLEDGE_DETAILS = HOST + "/bsb/knowledge/details";//知识库详情
        public final static String CASE_LIST = HOST + "/bsb/case/list";//案例库列表
        public final static String CASE_DETAILS = HOST + "/bsb/case/details";//案例库详情
        public final static String KNOWLEDGE_SEARCH = HOST + "/bsb/knowledge/serarch";//知识库查询接口
        public final static String KNOWLEDGE_SEARCH_MORE = HOST + "/bsb/knowledge/more/serarch";//知识库查询更多接口
        public final static String CASE_SEARCH = HOST + "/bsb/case/serarch";//案例库查询接口
        public final static String CASE_SEARCH_MORE = HOST + "/bsb/case/more/serarch";//案例库查询更多接口
        public final static String KNOWLEDGE_IMAGE = HOST + "/bsb/knowledge/img";//名师导航 获取图片名字接口
        public final static String PERSONAL_DATA = HOST + "/bsb/change/user";//修改用户信息
        public final static String CHANGE_PHONE = HOST + "/bsb/phone/chnage";//修改手机号
        public final static String HOME_SEARCH = HOST + "/bsb/home/serarch";//首页搜索接口
        public final static String EXPERT_ANSWER = HOST + "/bsb/list/expert";//专家答疑列表接口
        public final static String EXPERT_ANSWER_DETAIL = HOST + "/bsb/expert/details";//专家答疑详情接口
        public final static String EXPERT_ANSWER_REPORT = HOST + "/bsb/release/report";//专家答疑举报接口
        public final static String EXPERT_TREE = HOST + "/bsb/category/tree";//专家答疑筛选菜单数据接口
        public final static String EXPERT_ADDRESS = HOST + "/bsb/area/tree";//专家答疑筛选菜单地区数据接口
        public final static String SEND_CLOSELY_QUESTION = HOST + "/bsb/realease/ask";//发布追问问题
        public final static String SEND_RECORDER = HOST + "/bsb/upload/voice";//语音上传
        public final static String SEND_EXPERT_RELEASE = HOST + "/bsb/expert/release";//专家发布答疑+补录接口
        public final static String EXPERT_RECORDER_LIST = HOST + "/bsb/list/toExpert";//专家发布录音列表接口
        public final static String EXPERT_RECORDER_DETAIL = HOST + "/bsb/expert/toDetailse";//专家发布录音详情接口
        public final static String EXPERT_RECORDER_EDIT = HOST + "/bsb/expert/edit";//专家发布录音编辑接口
        public final static String SEND_O2O_QUESTION = HOST + "/bsb/release/one";//发布一对一问题
        public final static String COUNSELOR_LIST = HOST + "/bsb/list/tax";//事务所咨询师列表
        public final static String AUDIO_PLAY = HOST + "bsb/download/";//听语音接口
        public final static String AUDIO_AUTHORIZED = HOST + "/bsb/voice/authorized";//语音文字授权接口
        public final static String AUDIO_BUY = HOST + "/bsb/buy/qu";//专家答疑语音文字购买接口
        public final static String VIP_BUY = HOST + "/bsb/card/buy";//购买365会员卡
        public final static String CARD_RECHARGE = HOST + "/bsb/recharge/card";//实体卡充值
        public final static String LIST_ROTATION = HOST + "/bsb/list/rotation";//轮播图接口
        public final static String LIST_POLICY = HOST + "/bsb/list/policy";//政策解读接口
        public final static String POLICY_DETAILS = HOST + "/bsb/policy/details";//政策解读详情接口
        public final static String RELATE_DETAILS = HOST + "/bsb/relate/details";//相关解读详情接口
        public final static String QA_DETAILS = HOST + "/bsb/qa/details";//问答详情接口
        public final static String DETAILS_ROTATION = HOST + "/bsb/details/rotation";//轮播图详情
        public final static String LIST_PRODUCT = HOST + "/bsb/list/product";//产品列表
        public final static String PRODUCT_DETAILS = HOST + "/bsb/product/details";
        public final static String LIST_MOVING = HOST + "/bsb/list/moving";//事务所列表;
        public final static String MOVING_DETAILS = HOST + "/bsb/moving/details";//事务所详情
        public final static String STATUS_LIVE = HOST + "/bsb/status/live";//首页直播间接口
        public final static String VIDEO_LIST = HOST + "/bsb/video/list";//视频列表接口
        public final static String IS_BUY = HOST + "/bsb/is/buy";//视频是否购买接口
        public final static String VIDEO_BUY = HOST + "/bsb/video/buy";//购买视频接口
        public final static String HOME_SEARCH2 = HOST + "/bsb/homeTwo/serarch";//新搜索
        public final static String SEARCH_MORE = HOST + "/bsb/more/serarch";//搜索更多
        public final static String SIGN_COMPETITION = HOST + "/bsb/apply/compe";//报名竞赛
        public final static String VERSION_CODE = HOST + "/bsb/version/code";//版本更新接口
        public final static String SEARCH_TAX = HOST + "/bsb/serarch/tax";//搜索咨询师
        public final static String SEARCH_VOICE = HOST + "/bsb/expertqu/serarch";//搜索专家答疑（语音）

        /**
         * 分享
         */
        public final static String ICON_SHOW = DEBUG.getS1() + "/share//images/share.png";//分享中显示的logo
        public final static String TEXT_SHOW = "尖端财税教师团队打造行业领军权威课程,大咖老师给您带来前沿财税解读。";//分享中显示的text
        public final static String INVITE_TEXT_SHOW = "专业的合理节税产品 一站式税务筹划平台 点击即可接受邀请";//分享中显示的text
        //大咖访谈预告
        public final static String FORESHOW = DEBUG.getS1() + "/share/foreshow.html?uuid=";
        //视频
        public final static String VIDEO = DEBUG.getS1() + "/share/video.html";
        //大咖
        public final static String INTER_VIDEO = DEBUG.getS1() + "/share/playvideo.html";
        //技能培训大赛
        public final static String GAME_VIDEO = DEBUG.getS1() + "/share/gamevideo.html";
        //政策解读
        public final static String COACH = DEBUG.getS1() + "/share/tutorship.html?uuid=";
        //专家答疑
        public final static String EXPERT = DEBUG.getS1() + "/share/interactive.html?uuid=";
        //技能大赛简介图片
        public final static String MACTHIMAGE = DEBUG.getS1() + "/share/gameinfo.html";
        //链接/二维码邀请会员
        public final static String INVITE_MEMBERS = DEBUG.getS1() + "/bsbshare/officeshare/Invitemem.html";
        //知识库分享
        public final static String KNOWLEDGE = DEBUG.getS1() + "/share/kbs.html";
        //案例库分享
        public final static String CASE = DEBUG.getS1() + "/share/casebase.html";



        //用户信息接口
        public final static String USER_MESSAGE = HOST + "/bsb/user/messge";
        //关于我们
        public final static String ABOUT_US = DEBUG.getS1() + "/about/about.html";

        //获取播放时长接口
        public final static String TIME_COMPE = HOST + "bsb/time/compe";

        //税率速查列表接口
        public final static String TAX_RATE_LIST = HOST + "/bsb/taxrate/list";
        //会计速查类型
        public final static String ACCOUNTANT_TYPE_TREE = HOST + "/bsb/accountingtype/tree";
        //会计速查列表
        public final static String ACCOUNTANT_LIST = HOST + "/bsb/accounting/list";
        //会计速查详情
        public final static String ACCOUNTANT_DETAILS = HOST + "/bsb/accounting/details";
        //邀请记录
        public final static String INVITE_LIST = HOST + "/bsb/invite/userlists";
        //系统消息列表
        public final static String INFORMATION_LIST = HOST + "/bsb/list/msg";
        //系统消息详情
        public final static String INFORMATION_DETAILS = HOST + "/bsb/msg/details";
        //一级邀请（直接）
        public final static String DIRECT_LIST = HOST + "/bsb/one/rebate";
        //二级邀请（间接）
        public final static String INDIRECT_LIST = HOST + "/bsb/two/rebate";
        //二级邀请（间接）
        public final static String INVITE_PRICE = HOST + "/bsb/rebate/count";
    }

    /**
     * 响应code
     **/
    public static class Code {
        public final static String SUCCESS = "1";
        public final static String SYSTEMEXCEPTION = "0";
        public final static String ERROR = "3";
        public final static String LOGIN_AGAIN = "2";
        public final static String FORCE_ANSWER = "4";
    }

    /**
     * 微信 appID
     */

    public static class WXID {
        public final static String APP_ID = "wxeb6c0f527f0864db";
    }

    /*
   * 录音文件
   * **/
    public static class LocalFile {
        public final static String DIR = Environment.getExternalStorageDirectory().getPath() + "/jsb_audio/adio.amr";
    }

    /**
     * apk名称
     * apk存放位置
     */
    public static class APK {
        public final static String APK_NAME = "banshuibao.apk";
        public final static String APK_ADDRESS = DEBUG.getS1() + "download/apk/";
    }

    /**
     *
     * */
    public enum Host {

        REL("https://bsb.jieshuibao.com/", "https://bsb.jieshuibao.com/", false),
        TEST("http://test.jieshuibao.com/jsb_bsb/", "http://test.jieshuibao.com/", true),
        LOCAL("http://test.jieshuibao.com/share/", "http://test.jieshuibao.com/", true);

        private String host;

        private boolean isDebug;

        private String s1;

        Host(String s, String s1, boolean b) {
            this.host = s;
            this.s1 = s1;
            this.isDebug = b;
        }

        public String getHost() {
            return host;
        }

        public boolean isDebug() {
            return isDebug;
        }

        public String getS1() {
            return s1;
        }

    }
}
